package com.sqy.controller;

import cn.hutool.core.lang.tree.Tree;
import com.sqy.service.ProductService;
import com.sqy.utlis.ApiResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Product")
@Api(tags = "分类对象")
public class ProductController {

    @Autowired
    ProductService  productService;


    @GetMapping("/list")
    public ApiResult getProductList(){

        List<Tree<String>> list = productService.getProductList();

        return  ApiResult.success(list);
    }



}
